package gerenciadorDeMemoria;

import java.util.Random;

public class Util {

	public static int NPAGINAS = 8;
	public static int NFRAMES = 32;
	
	public static int gerarNumeroAleatorio(int i){
		Random r = new Random();
		int result = 0;
		boolean sair = false;
		while (!sair){
			result = r.nextInt(i);
			if ( result > 0){
				sair = true;
			}
		}
		return result;
	}
	
	public static int gerarNumAl(int i){
		Random r = new Random();
		int result = 0;
		boolean sair = false;
		while (!sair){
			result = r.nextInt(i);
			if ( result >= 0){
				sair = true;
			}
		}
		return result;
	}
}
